<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <meta name="viewport" content="width=device-width, user-scalable=0" />
    <head>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>注册账号</title>
        <style type="text/css">
            <!--
            body {
                background-image: url(images/bg.gif);
                margin-left: 0px;
                margin-top: 0px;
                margin-right: 0px;
                margin-bottom: 0px;
            }
			.font-style12 {
				font-family: "宋体", Arial, Helvetica, sans-serif;
				font-size: 12px;
				color:#990000;
			}
            .font-style25 {
                font-family: "宋体", Arial, Helvetica, sans-serif;
                font-size: 14px;
            }
            .font-style35 {
                font-family: "宋体", Arial, Helvetica, sans-serif;
                font-size: 16px;
                font-weight: bold;
            }
            .input_word {	height: 25px;
                          width: 200px;
                          BACKGROUND-IMAGE: url(images/input_1.png);
                          BACKGROUND-REPEAT: no-repeat;
                          BORDER-LEFT-STYLE:none;
                          BORDER-RIGHT-STYLE: none;
                          BORDER-TOP-STYLE: none;
                          BORDER-bottom-STYLE: none;
                          padding-left:10px
            }
            .input_password {	height: 25px;
                              width: 200px;
                              BACKGROUND-IMAGE: url(images/input_2.png);
                              BACKGROUND-REPEAT: no-repeat;
                              BORDER-LEFT-STYLE:none;
                              BORDER-RIGHT-STYLE: none;
                              BORDER-TOP-STYLE: none;
                              BORDER-bottom-STYLE: none;
                              padding-left:10px
            }
            .c1,.c2{
                width:185px;
                line-height:240px;
            }
            .STYLE1 {color: #3366FF}
            .STYLE3 {font-family: "宋体", Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; color: #CC0066; }
			.STYLE5 {font-family: "宋体", Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; color: #FF0000; }

            -->
        </style>
        <script type="text/javascript">
            function radioShow(){
                var r1 = document.getElementById("r1");
                var r2 = document.getElementById("r2");
                var c1 = document.getElementById("c1");
                var c2 = document.getElementById("c2");
                if(r1.checked){
                    c1.style.display = "block";
                    c2.style.display = "none";
                }
                if(r2.checked){
                    c1.style.display = "none";
                    c2.style.display = "block";
                }
            }
            function submitCheck(){
                var email = document.getElementById("email").value;
                var password = document.getElementById("password").value;
                var password2 = document.getElementById("password2").value;
                var name = document.getElementById("name").value;
                var sex = document.getElementById("sex").value;
                var cansubmit = true;
                if(email==""){
                    alert("请输入邮箱");
                    cansubmit = false;
                }else if(password==""){
                    alert("请输入密码");
                    cansubmit = false;
                }else if(password2==""){
                    alert("请输入确认密码");
                    cansubmit = false;
                }else if(name==""){
                    alert("请输入昵称");
                    cansubmit = false;
                }else if(password!=password2){
                    alert("两次输入的密码不一样");
                    cansubmit = false;
                }else if(name.length<3||name.length>12){
                    alert("昵称小于3个字或者大于12个字");
                    cansubmit = false;
                }
                if(!cansubmit){
                    event.returnValue = false;
                }
            }
        </script>
        <script language="javascript" type="text/javascript">
            // 密码输入框JScript 文件
            function getStar(control,logValue,txt)
            {
                if(control.value==logValue)
                {
                    control.value="";
                    control.style.color="black";

                    if(control.type=="text"){
                        control.style.display = "none";
                        document.getElementById('password').style.display = "block";
                        document.getElementById('password').style.color="black";
                        document.getElementById('password').value="";
                        document.getElementById('password').focus();//加上
                    }else{
                        var pass = document.getElementById('password').value;
                        if(pass.length<1){
                            control.style.display = "none";
                            document.getElementById('log').style.display = "block";
                        }
                    }
                }
            }
            function GetEnd(control,logValue,txt)
            {
                if(control.value=="")
                {
                    control.value="仅支持6～20位英文或数字";
                    control.style.color="#666666";

                    if(control.type=="password"){
                        control.style.display = "none";
                        document.getElementById('log').style.display = "block";
                        document.getElementById('log').value="仅支持6～20位英文或数字";
                        document.getElementById('log').style.color="#666666";
                        //document.getElementById('log').focus();//加上
                    }
                    else{
                        var pass = document.getElementById('log').value;

                        if(pass.length<1){
                            control.style.display = "none";
                            document.getElementById('log').style.display = "block";
                        }
                    }
                }
            }
        </script>
    </head>
    <?php
    require_once 'common/common.php';
    $usercode = getParameter("usercode");
    $nickname = getParameter("nickname");
    $email = getParameter("email");
    $sex = getParameter("sex");
    if ($email == "") {
        $email_value = "";
    } else {
        $email_value = $email;
    }
    if ($nickname == "") {
        $nickname_value = "";
    } else {
        $nickname_value = $nickname;
    }
    $password_value = "";
    ?>
    <body>
        <table width="528" border="0" align="center" cellpadding="0" cellspacing="0" >
            <tr>
                <td height="50" colspan="2" bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
                  <tr>
                    <td align="center" class="STYLE5"></td>
                  </tr>
                </table></td>
                <td width="193"><img src="images/i_1.gif" width="193" height="51" /></td>
            </tr>
            <tr>
                <td><img src="images/i_2.gif" width="114" height="60" /></td>
                <td><img src="images/i_3.gif" width="221" height="60" /></td>
                <td><img src="images/j_1.jpg" width="193" height="60" /></td>
            </tr>
            <tr>
                <td colspan="3" background="images/bg_2.gif"><table width="528" border="0" align="center" cellpadding="10" cellspacing="0">
                        <tr>
                            <td>
                                <form id="form1" name="form1" method="post" action="register_web2.php">
                                    <table width="99%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td width="20%" height="30" align="center" class="font-style25">邮箱地址：
                                          <input name="usercode" type="hidden" id="usercode" value="<?php echo $usercode; ?>"/></td>
                                          <td width="43%" height="30"><input name="email" type="text" class="input_word"  id="email" size="30" style="font-size:12px;color:#666666;" value="<?php echo $email_value;?>" /></td>
                                            <td width="37%" rowspan="8" align="center">
                                                <div id="c">
                                                    <div class="c1" id="c1" <?php if ($sex != 0) { ?> style="display:block;" <?php }else{ ?> style="display:none;" <?php }?>>
                                                        <label for="boy"><img src="images/170-ya.png" width="128" height="170" /></label>
                                              </div>
                                                    <div class="c2" id="c2" <?php if ($sex == 0) { ?> style="display:block;" <?php }else{ ?> style="display:none;" <?php }?>>
                                                        <label for="girl"><img src="images/170-ni.png" width="128" height="170" /></label>
                                                    </div>
                                                </div>            </td>
                                        </tr>
                                        <tr>
                                          <td height="15" align="center" class="font-style25">&nbsp;</td>
                                          <td><span class="font-style12">建议您使用真实邮箱地址</span></td>
                                        </tr>
                                        <tr>
                                          <td height="10" colspan="2" align="center" class="font-style25"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tr>
                                              <td background="images/xian.gif"><img src="images/xian.gif" width="4" height="10" /></td>
                                            </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                            <td height="30" align="center" class="font-style25">输入密码：</td>
                                          <td height="30"><input id="password" name="password" class="input_password" style="font-size:12px;color:#666666;" size="30" maxlength="25"  type="password"/></td>
                                        </tr>
                                        <tr>
                                          <td height="15" align="center" class="font-style25">&nbsp;</td>
                                          <td class="font-style12">密码仅支持6-20位英文或数字</td>
                                        </tr>
                                        <tr>
                                          <td height="10" colspan="2" align="center" class="font-style25"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tr>
                                              <td background="images/xian.gif"><img src="images/xian.gif" width="4" height="10" /></td>
                                            </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                            <td height="35" align="center" class="font-style25">确认密码：</td>
                                            <td height="35"><input name="password2" type="password" class="input_password" id="password2" style="font-size:12px;color:#666666;" size="30" maxlength="25" value="<?php echo $password_value;?>"/></td>
                                        </tr>
										<tr>
                                          <td height="10" colspan="2" align="center" class="font-style25"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tr>
                                              <td background="images/xian.gif"><img src="images/xian.gif" width="4" height="10" /></td>
                                            </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                            <td height="30" align="center" class="font-style25">输入昵称：</td>
                                            <td height="30"><input name="nickname" type="text" class="input_word" id="name" style="font-size:12px;color:#666666;"   size="30"  value="<?php echo $nickname_value;?>"/></td>
											<td width="37%" rowspan="5" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="5">
                                              <tr>
                                                <td align="center"><input name="from" id="from" type="hidden" value="web" />
                                                    <label>
                                                    <input name="Submit" type="image" value="提交" src="images/go.png" width="120" height="70" border="0" />
                                                  </label></td>
                                              </tr>
                                            </table></td>
                                        </tr>
                                        <tr>
                                          <td height="15" align="center" class="font-style25">&nbsp;</td>
                                          <td class="font-style12">支持4-15位字母和数字(每个中文算3位)</td>
                                        </tr>
                                        <tr>
                                          <td height="10" colspan="2" align="center" class="font-style25"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tr>
                                              <td background="images/xian.gif"><img src="images/xian.gif" width="4" height="10" /></td>
                                            </tr>
                                          </table></td>
                                          <td align="center">&nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td height="35" align="center" class="font-style25">宝宝性别：</td>
                                            <td height="35"><label>
                                                    <label for="r1" class="red"><input name="sex" id="r1" type="radio" value="1" <?php if ($sex != 0) { ?> checked="checked" <?php } ?> onClick="radioShow();" />
                                                        <span class="font-style35"><span class="STYLE1">男孩</span> 　 </span></label>
                                                    <label for="r2" class="red"><input name="sex" id="r2" type="radio" value="0" <?php if ($sex == 0) { ?> checked="checked" <?php } ?>  onclick="radioShow();" /><span class="STYLE3">女孩</span></label> </td>
                                        </tr>
                                  </table>

                                </form>
                            </td>
                        </tr>
                    </table></td>
            </tr>
            <tr>
                <td colspan="3"><table width="528" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="18"><img src="images/i_4.gif" width="18" height="18" /></td>
                            <td width="505" background="images/bg_3.gif">&nbsp;</td>
                            <td width="18"><img src="images/i_5.gif" width="18" height="18" /></td>
                        </tr>
                    </table></td>
            </tr>
        </table>
    </body>
</html>
